package ${servicePackageName};

import ${modelPackageName}.${table.className};
<#assign keyType="" >
<#assign paramsName="" >
<#if table.ids?size gt 1 >
    <#assign keyType="${table.className!}Key" >
    <#assign paramsName="key" >
import ${modelPackageName}.${keyType};
</#if>
<#if table.ids?size == 1 >
    <#assign keyType="${table.ids[0].fieldType}" >
    <#assign paramsName="${table.ids[0].fieldName}" >
</#if>

import java.util.List;

/**
* ${(table.className)!}
*
* User: ${userName}
* DateTime: ${dataTime}
*
*/
public interface ${table.className}Service {

    /**
    *
    * 根据主键查询${table.className}对象
    *
    * @param ${paramsName}
    * @return ${table.className}对象
    */
    ${table.className} selectByPrimaryKey(${keyType} ${paramsName}) throws Exception;

    /**
    *
    * 根据查询条件查询符合条件的${table.className}对象
    *
    * @param ${table.className ? uncap_first}
    * @return 符合条件的${table.className}对象List
    */
    List<${table.className}> select(${table.className} ${table.className ? uncap_first}) throws Exception;

    /**
    *
    * 根据主键删除${table.className}对象
    *
    * @param ${paramsName}
    * @return 影响条件数
    */
    int deleteByPrimaryKey(${keyType} ${paramsName}) throws Exception;

    /**
    *
    * 根据条件删除符合条件的${table.className}对象
    *
    * @param ${table.className ? uncap_first}
    * @return 影响条件数
    */
    int delete(${table.className} ${table.className ? uncap_first}) throws Exception;

    /**
    *
    * 插入${table.className}对象
    *
    * @param ${table.className ? uncap_first}
    * @return 影响条件数
    */
    int insert(${table.className} ${table.className ? uncap_first}) throws Exception;

    /**
    *
    * 更新${table.className}对象
    *
    * @param ${table.className ? uncap_first}
    * @return 影响条件数
    */
    int update(${table.className} ${table.className ? uncap_first}) throws Exception;

}
